{{ $url     := .Permalink }}
{{ $title   := cond .IsHome site.Title .Title }}
{{ $type    := cond .IsHome "website" "article" }}
{{ $desc    := .Param "description" }}
{{ $twitter := site.Params.social.twitter_handle }}
{{ $img     := "img/logos/grpc-icon-color.png" | absURL }}
{{ $imgAlt  := printf "%s color logo" site.Title }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type $url site.Title | safeHTML }}
{{ end -}}

<link rel="canonical" href="{{ $url }}">

{{/* Twitter Card metadata */}}
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="{{ $twitter }}">
<meta name="twitter:creator" content="{{ $twitter }}">
<meta name="twitter:image" content="{{ $img }}">
<meta name="twitter:image:alt" content="{{ $imgAlt }}">

{{/* OpenGraph metadata */}}
<meta property="og:url" content="{{ $url }}">
<meta property="og:title" content="{{ $title }}">
{{ with $desc }}
<meta property="og:description" content="{{ $desc }}">
{{ end }}
<meta property="og:type" content="{{ $type }}">
<meta property="og:site_name" content="{{ site.Title }}">
<meta property="og:image" content="{{ $img }}">
<meta property="og:image:type" content="image/png">
<meta property="og:image:alt" content="{{ $imgAlt }}">
<meta property="og:locale" content="{{ site.Params.locale }}">